import { textStore } from "@/stores/allStores";

import { computed, defineComponent, ref } from "vue";
import c from "./main.module.scss";
export default defineComponent({
  name: "home",
  setup(prop, ctx) {

    const userRole = computed(() => textStore.getUserRole);

    const changeUserRole = () => {
      console.log('1111');

      textStore.setUserRole(2)
    }


    return () => {
      return (
        <div class={c.main}>
          <div class={c.title}>欢迎使用管理系统15</div>

          <div>当前的用户角色:{userRole.value}</div>

          <div onClick={changeUserRole}>修改用户角色</div>
        </div>
      );
    };
  },
});
